package com.lyf.design.summary.njusoftware.coupling;

/**
 * 继承耦合 修改（规格，实现）；精化（规格，实现）；拓展 ，无
 *
 * @author liyunfei
 */
public class ExtendsCoupling {
    
    private static abstract class Father {
        
        private String name;
        
        private Integer age;
        
        public void run() {
        
        }
        
        public void eat() {
            System.out.println("吃饭");
        }
        
        public abstract void run(int i);
    }
    
    // 修改接口--？
    private static class Son1 extends Father {
        @Override
        public void run(int i) {
            super.run();
        }
    }
    
    // 修改实现--
    private class Son2 extends Father {
        
        @Override
        public void run(int i) {
            System.out.println("son 修改实现");
        }
    }
    
    // 精化接口
    private class Son3 extends Father {
        
        @Override
        public void run(int i) {
            super.run();
            //
        }
    }
    
    public static void main(String[] args) {
        Son1 son1 = new Son1();
        
    }
    
    
}
